%{
#include "parse.tab.h"
#define yywrap() 0
void yyerror(){ /*do nothing*/ }
/*
extern union {
	double dval;
	int vblno;
} yylval;
*/
extern YYSTYPE yylval;
%}
%s COMMENT STR
%%
[0-9]+		|
-[0-9]+		|
[0-9]+\.[0-9]+	|
-[0-9]+\.[0-9]+	{yylval.dval=atof(yytext);return NUMBER;}
[ \t]		;
\n		return 0;
[a-z]		{yylval.vblno=yytext[0]-'a';return NAME;}
\+		{return ADD;}
-		{return SUB;}
\*		{return MUL;}
\/		{return DIV;}
=		{return ASSIGN;}
\\		{exit(0);}
\/\^		{BEGIN COMMENT;}
<COMMENT>\^\/	{BEGIN 0;}
.		{printf("what is %s\n",yytext);}
%%
main()
{
	for(;;)
	{
		yyparse();
	}
}
